<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>完美世界商城后台管理 </title>

    <!-- Bootstrap -->
    <link href="../vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- bootstrap-progressbar -->
    <link href="../vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
    <!-- Custom Theme Style -->
    <link href="../vendors/custom/custom.min.css" rel="stylesheet">

</head>

<body class="nav-md">
<div class="container body">
    <div class="main_container">
        <div class="col-md-3 left_col">
            <div class="left_col scroll-view">
                <div class="navbar nav_title" style="border: 0;">
                    <a href="index.html" class="site_title"><img src="../images/logo.png"></a>
                </div>

                <div class="clearfix"></div>

                <!-- menu profile quick info -->
                <div class="profile">
                    <div class="profile_pic">
                        <img src="../images/img.jpg" alt="..." class="img-circle profile_img">
                    </div>
                    <div class="profile_info">
                        <span>Welcome,</span>
                        <h2 class="username"></h2>
                    </div>
                </div>
                <!-- /menu profile quick info -->

                <br/>

                <!-- sidebar menu -->
                <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
                    <div class="menu_section">
                        <h3>General</h3>
                        <ul class="nav side-menu">
                            <!--<li><a><i class="fa fa-home"></i> 主页 <span class="fa fa-chevron-down"></span></a>-->
                                <!--<ul class="nav child_menu">-->
                                    <!--<li><a href="index.html"> 暂定 </a></li>-->
                                <!--</ul>-->
                            <!--</li>-->
                            <li><a><i class="fa fa-gift"></i> 商品管理 <span class="fa fa-chevron-down"></span></a>
                                <ul class="nav child_menu">
                                    <li><a href="javascript:void(0);" onclick="changeIframe('goods/goods.html')"
                                           id="goods/goods.html"> 商品列表 </a></li>
                                    <li><a href="javascript:void(0);" onclick="changeIframe('goods/goodImgs.html')"
                                           id="goods/goods2.html"> 商品图片列表 </a></li>
                                    <li><a href="javascript:void(0);" onclick="changeIframe('goods/categery.html')"
                                           id="goods/categery.html"> 分类列表 </a></li>
                                </ul>
                            </li>
                            <li><a><i class="fa fa-bars"></i> 订单管理 <span class="fa fa-chevron-down"></span></a>
                                <ul class="nav child_menu">
                                    <li><a href="javascript:void(0);" onclick="changeIframe('orders/orders.html')"
                                           id="orders/orders.html"> 订单列表 </a></li>
                                    <li><a href="javascript:void(0);" onclick="changeIframe('orders/ordersAddr.html')"
                                           id="orders/ordersAddr.html"> 送货地址 </a></li>
                                </ul>
                            </li>

                        </ul>
                    </div>
                </div>
                <!-- /sidebar menu -->

                <!-- /menu footer buttons -->
                <div class="sidebar-footer hidden-small">
                    <a data-toggle="tooltip" data-placement="top" title="Settings" href="javascript:void(0);"
                       onclick="changeIframe('changePasswd.html')">
                        <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
                    </a>

                    <a data-toggle="tooltip" data-placement="top" title="Logout" class="logout">
                        <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
                    </a>
                </div>
                <!-- /menu footer buttons -->
            </div>
        </div>

        <!-- top navigation -->
        <div class="top_nav">
            <div class="nav_menu">
                <nav>
                    <div class="nav toggle">
                        <a id="menu_toggle"><i class="fa fa-bars"></i></a>
                    </div>

                    <ul class="nav navbar-nav navbar-right">
                        <li class="">
                            <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown"
                               aria-expanded="false">
                                <img src="../images/img.jpg" alt=""><span class="username"></span>
                                <span class=" fa fa-angle-down"></span>
                            </a>
                            <ul class="dropdown-menu dropdown-usermenu pull-right">
                                <li><a class="logout"><i class="fa fa-sign-out pull-right"></i> Log Out</a></li>
                            </ul>
                        </li>

                    </ul>
                </nav>
            </div>
        </div>
        <!-- /top navigation -->

        <!-- page content -->

        <!--其他页面-->
        <div class="right_col" role="main">
            <iframe id="iframe" src='goods/goods.html' width="100%" frameborder="0" scrolling="auto"
                    onload="setWinHeight(this)"></iframe>
        </div>
        <!-- /page content -->

        <!-- footer content -->
        <footer>
            <div class="pull-right">
                Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
            </div>
            <div class="clearfix"></div>
        </footer>
        <!-- /footer content -->
    </div>
</div>

<!-- jQuery -->
<script src="../vendors/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="../vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- bootstrap-progressbar -->
<script src="../vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
<!-- Custom Theme Scripts -->
<script src="../vendors/custom/custom.js"></script>
<!--myself script-->
<script src="../../vendors/myself/myself.js"></script>

<!-- customer javascript -->
<script type="text/javascript">

    function changeIframe(value) {
        $('#iframe').attr('src', value)
    }

    /**
     * ifrme自适应页面高度
     * @param iframe
     */
    function setWinHeight(iframe) {
        var bodyHeight = document.getElementsByClassName("right_col")[0].clientHeight;
        iframe.height = getHeight();
    }

    /**
     * 获取用户名
     */
    $(function () {
        $.ajax('/user/getLoginedUser', {
            success: function (data) {
                $('.username').html(data.rows.username);
            },
        })
    });

    $('.logout').click(function () {
        $.ajax('/user/userExit', {
            success: function (data) {
                window.location.href = '/login.html';
            },
        });
    });


</script>
<!-- /customer javascript -->

</body>

</html>